package com.debby.test.fish;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;

public class DialogUtil {



	public static void showAlertDialog(Context context, String msg, int resPositiveId, int resNegativeId, DialogInterface.OnClickListener positiveListener,
			DialogInterface.OnClickListener negativeListener) {
		new AlertDialog.Builder(context).setTitle(R.string.app_name).setIcon(android.R.drawable.ic_dialog_alert).setMessage(msg).setPositiveButton(resPositiveId, positiveListener)
				.setNegativeButton(resNegativeId, negativeListener).show();
	}

	public static void showAlertDialog(Context context, int msgResId, int resPositiveId, int resNegativeId, DialogInterface.OnClickListener positiveListener,
			DialogInterface.OnClickListener negativeListener) {
		new AlertDialog.Builder(context).setTitle(R.string.app_name).setIcon(android.R.drawable.ic_dialog_alert).setMessage(msgResId).setPositiveButton(resPositiveId, positiveListener)
				.setNegativeButton(resNegativeId, negativeListener).show();
	}
	public static void showErrorDialog(Context context, String msg, int resPositiveId, DialogInterface.OnClickListener positiveListener) {
		new AlertDialog.Builder(context).setTitle(R.string.app_name).setIcon(android.R.drawable.ic_dialog_alert).setMessage(msg).setPositiveButton(resPositiveId, positiveListener).show();
	}
}
